<?php if(!isset($delete_button)) $delete_button = true; ?>
    <div class="course_instructor_pair course_instructor_doseyeh_pair">
        <div class="course_select">
            <label><?php echo __('Course') ?></label>
            <div class="dos_select">
                <select id="course_<?php echo $index ?>" name="course[]" class="course" onchange="update_instructor(this)">
                    <option value=""><?php echo __('Select') ?></option>
                    <?php foreach($courses as $one){ ?>
                        <option <?php echo (isset($course_id) && $course_id == $one['id']) ? 'selected="selected"' : '' ?> value="<?php echo $one['id'] ?>"><?php echo $one['name'] ?></option>
                    <?php } ?>
                </select>
            </div>
        </div>
        <div class="instructor_select">
            <label><?php echo __('Instructor') ?></label><div class="dos_select">
                <select id="instructor_<?php echo $index ?>" name="instructor[]" class="instructor" onchange="update_doseyeh(this)>
                    <?php if(isset($course_instructor) && isset($course_id)){ ?>
                        <option value="">- Select Instructor -</option>
                        <?php foreach($course_instructor[$course_id] as $one){ ?>
                            <option value="<?php echo $one['id'] ?>" <?php echo ($one['id'] == $instructor_id) ? 'selected="selected"' : '' ?> ><?php echo $one['name'] ?></option>
                        <?php } ?>
                    <?php } else { ?>
                        <option value="">- <?php echo __('Select a Course') ?> -</option>
                    <?php } ?>
                </select>
            </div>
        </div>
       
        <div class="doseyeh_select">
            <label><?php echo __('Doseyeh') ?></label><div class="dos_select">
                <select id="doseyeh_<?php echo $index ?>" name="doseyeh[]" class="doseyeh">
                    <?php if(isset($course_instructor) && isset($course_id)){ ?>
                        <option value="">- Select Instructor -</option>
                        <?php foreach($course_instructor[$course_id] as $one){ ?>
                            <option value="<?php echo $one['id'] ?>" <?php echo ($one['id'] == $instructor_id) ? 'selected="selected"' : '' ?> ><?php echo $one['name'] ?></option>
                        <?php } ?>
                    <?php } else { ?>
                        <option value="">- <?php echo __('Select Instructor') ?> -</option>
                    <?php } ?>
                </select>
            </div>
        </div>
         </div>
        <?php if($delete_button) { ?>
            <div class="delete_button" onclick="return delete_ci_row(this)"></div>
        <?php } ?>
        <div class="clear"></div>
    </div>